package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 咨询来源
 */
@EnumDescription("问诊订单类型")
public enum InquiryOrderSourceEnum implements DictEnum {

	//--------------------start-----------------

	/**
	 * 找医生
	 */
	LOOKING_FOR_A_DOCTOR("01","找医生"),
	/**
	 * 自诊
	 */
	SINCE_THE_DIAGNOSIS("02","自诊"),
	/**
	 * 快速问诊
	 */
	RAPID_INTERROGATION("03","快速问诊"),

	/**
	 * 继续咨询
	 */
	CONTINUE_CONSULT("04","继续咨询"),


	//--------------------end-------------------
	;
	private String key;

	private String value;

	InquiryOrderSourceEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}


	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(InquiryOrderSourceEnum.class, value);
		}
	}
}
